$(function(){
	// kliknieto w sprzedaz
	$("#ViewOfferTransakcjaId1").change(function(){
		if($(this).attr('checked')){
			cena_od =[ {"v":1, "d": " - wybierz - "},{"v":50000, "d": "50 000"},{"v":100000, "d": "100 000"},{"v":150000, "d": "150 000"},{"v":200000, "d": "200 000"},{"v":250000, "d": "250 000"},{"v":300000, "d": "300 000"},{"v":350000, "d": "350 000"},{"v":400000, "d": "400 000"},{"v":450000, "d": "450 000"},{"v":500000, "d": "500 000"},{"v":550000, "d": "550 000"},{"v":600000, "d": "600 000"},{"v":650000, "d": "650 000"},{"v":700000, "d": "700 000"},{"v":750000, "d": "750 000"},{"v":800000, "d": "800 000"},{"v":850000, "d": "850 000"},{"v":900000, "d": "900 000"},{"v":950000, "d": "950 000"},{"v":1000000, "d": "1000 000"}];
			cena_do =[ {"v":0, "d": " - wybierz - "},{"v":50000, "d": "50 000"},{"v":100000, "d": "100 000"},{"v":150000, "d": "150 000"},{"v":200000, "d": "200 000"},{"v":250000, "d": "250 000"},{"v":300000, "d": "300 000"},{"v":350000, "d": "350 000"},{"v":400000, "d": "400 000"},{"v":450000, "d": "450 000"},{"v":500000, "d": "500 000"},{"v":550000, "d": "550 000"},{"v":600000, "d": "600 000"},{"v":650000, "d": "650 000"},{"v":700000, "d": "700 000"},{"v":750000, "d": "750 000"},{"v":800000, "d": "800 000"},{"v":850000, "d": "850 000"},{"v":900000, "d": "900 000"},{"v":950000, "d": "950 000"},{"v":1000000, "d": "1000 000"}];
			var options_od = '';
			for (var i = 0; i < cena_od.length; i++) {
				options_od += '<option value="' + cena_od[i].v + '">' + cena_od[i].d + '</option>';
			}
			var options_do = '';
			for (var i = 0; i < cena_do.length; i++) {
				options_do += '<option value="' + cena_do[i].v + '">' + cena_do[i].d + '</option>';
			}	      
			$("select#ViewOfferCenaOd").html(options_od);
			$("select#ViewOfferCenaDo").html(options_do);
		}
	});

	// kliknieto w sprzedaz
	$("#ViewOfferTransakcjaId2").change(function(){
		if($(this).attr('checked')){
			cena_od =[ {"v":1, "d": " - wybierz - "},{"v":500, "d": "500"},{"v":1000, "d": "1 000"},{"v":1500, "d": "1 500"},{"v":2000, "d": "2 000"},{"v":2500, "d": "2 500"},{"v":3000, "d": "3 000"},{"v":3500, "d": "3 500"},{"v":4000, "d": "4 000"},{"v":4500, "d": "4 500"},{"v":5000, "d": "5000"},{"v":5500, "d": "5 500"},{"v":6000, "d": "6 000"},{"v":6500, "d": "6 500"},{"v":7000, "d": "7 000"},{"v":7500, "d": "7 500"},{"v":8000, "d": "8000"},{"v":8500, "d": "8 500"},{"v":9000, "d": "9000"},{"v":9500, "d": "9 500"},{"v":10000, "d": "10 000"}];
			cena_do =[ {"v":0, "d": " - wybierz - "},{"v":500, "d": "500"},{"v":1000, "d": "1 000"},{"v":1500, "d": "1 500"},{"v":2000, "d": "2 000"},{"v":2500, "d": "2 500"},{"v":3000, "d": "3 000"},{"v":3500, "d": "3 500"},{"v":4000, "d": "4 000"},{"v":4500, "d": "4 500"},{"v":5000, "d": "5000"},{"v":5500, "d": "5 500"},{"v":6000, "d": "6 000"},{"v":6500, "d": "6 500"},{"v":7000, "d": "7 000"},{"v":7500, "d": "7 500"},{"v":8000, "d": "8000"},{"v":8500, "d": "8 500"},{"v":9000, "d": "9000"},{"v":9500, "d": "9 500"},{"v":10000, "d": "10 000"}];
			var options_od = '';
			for (var i = 0; i < cena_od.length; i++) {
				options_od += '<option value="' + cena_od[i].v + '">' + cena_od[i].d + '</option>';
			}
			var options_do = '';
			for (var i = 0; i < cena_do.length; i++) {
				options_do += '<option value="' + cena_do[i].v + '">' + cena_do[i].d + '</option>';
			}	      
			$("select#ViewOfferCenaOd").html(options_od);
			$("select#ViewOfferCenaDo").html(options_do);
		}
	});
});